//
//  ConfirmCell.m
//  FKGW
//
//  Created by song ce on 2017/2/28.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "ConfirmCell.h"
#import "UIView+Extend.h"
#import "OSSHelper.h"
@implementation ConfirmCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.xOssProcess =  [NSString stringWithFormat:@"image/resize,m_fill,w_%d,h_%d",68,65];
}

-(void)setModel:(ShopCartModel *)model{
    _model = model;
    self.goodsNameLabel.text = _model.name;
    self.priceLabel.text = [NSString stringWithFormat:@"%@",_model.pPrice];
    self.standardLabel.text= _model.pProperty;
    self.countLabel.text = [NSString stringWithFormat:@"x%ld",(long)_model.goodsCount];
    
    [[OSSHelper sharedHelper] OSSDownLoadWithObjectKey:_model.pPic xOssProcess:self.xOssProcess  downLoadBlock:^(NSData *data) {
        dispatch_async(dispatch_get_main_queue(), ^{
            self.goodsImageView.image = [UIImage imageWithData:data];
        });
    }];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
